public class MyThread implements Runnable{
    @Override
    public void run() {
        for (int i = 1; i < 100; i++) {

            try {
                Thread.sleep(20);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

            System.out.println(Thread.currentThread().getName()+":打了"+i+"个小兵");

        }
    }
}
